home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / misc / amised / scripts / hunt.rexx < prev    next >
OS/2 REXX Batch file  |  1999-04-19  |  609b  |  41 lines

  1. /* AMIS File hunter */
  2.  
  3. OPTIONS RESULTS
  4. /*address 'AMISPORT.1'*/
  5.  
  6. 'GetLine'
  7.  
  8. if(left(result,8)='#include') then
  9. do
  10.   PARSE VAR result . '<' File '>'
  11.   if(File="") then 
  12.   do
  13.     PARSE VAR result . '"' File '"'
  14.   end
  15.   if(exists(File)) then
  16.   do
  17.     'File NAME="'||File||'" OPEN'
  18.     exit
  19.   end
  20.   'Query PATH'
  21.   path=result
  22.   if(right(result,1)=':') then
  23.   do
  24.      PFile=path||File
  25.   end
  26.   else
  27.   do
  28.      PFile=path||'/'||File
  29.   end
  30.   if(exists(PFile)) then
  31.   do
  32.     'File NAME="'||PFile||'" OPEN'
  33.     exit
  34.   end
  35.   File='Include:'||File
  36.   if(exists(File)) then
  37.   do
  38.     'File NAME="'||File||'" OPEN'
  39.   end
  40. end
  41.